/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.dundd.dao;

import cz.muni.fi.pa165.dundd.entity.Troop;
import java.util.List;

/**
 * Interface defines the methods available for the communication with the
 * database
 *
 * @author xceluch
 */
public interface TroopDAO {

    /**
     * Creates an instance of the input object in the database
     *
     * @param troop
     */
    public void createTroop(Troop troop);

    /**
     * Updates the object in the database
     *
     * @param troop
     */
    public void updateTroop(Troop troop);

    /**
     * Deletes the object from the database
     *
     * @param troop
     */
    public void deleteTroop(Troop troop);

    /**
     * Returns a {@code List} of {@link Troop} entities in the database
     *
     * @return {@code List} of all {@code Troop} instances or [] if empty
     *
     */
    public List<Troop> retrieveAllTroops();

    /**
     * Returns the {@link Troop} for the given ID
     *
     * @param id ID of the {@link Troop} in the database
     * @return the found entity instance or null if it does not exist
     */
    public Troop retrieveTroopById(Long id);
}
